home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / src / MacSource / ImageWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-22  |  4.2 KB  |  127 lines  |  [TEXT/CWIE]

  1. /*==============================================================================
  2. Project:    POV-Ray
  3.  
  4. Version:    3
  5.  
  6. File:    ImageWindow.h
  7.  
  8. Description:
  9.     This file contains the Macintosh Image window routines for POV-Ray.
  10. ------------------------------------------------------------------------------
  11. Authors:
  12.     Jim Nitchals, David Harr, Eduard [esp] Schwan
  13. ------------------------------------------------------------------------------
  14.     from Persistence of Vision(tm) Ray Tracer
  15.     Copyright 1996 Persistence of Vision Team
  16. ------------------------------------------------------------------------------
  17.     NOTICE: This source code file is provided so that users may experiment
  18.     with enhancements to POV-Ray and to port the software to platforms other 
  19.     than those supported by the POV-Ray Team.  There are strict rules under
  20.     which you are permitted to use this file.  The rules are in the file
  21.     named POVLEGAL.DOC which should be distributed with this file. If 
  22.     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  23.     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  24.     Forum.  The latest version of POV-Ray may be found there as well.
  25.  
  26.     This program is based on the popular DKB raytracer version 2.12.
  27.     DKBTrace was originally written by David K. Buck.
  28.     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  29. ------------------------------------------------------------------------------
  30. Change History:
  31.     930610    [esp]    Created
  32.     931001    [esp]    version 2.0 finished (Released on 10/4/93)
  33.     960706    [esp]    Changed offscreen from old pixmaps to new GWorlds, now images can be bigger than 4Kx4K!
  34. ==============================================================================*/
  35.  
  36. #if !defined(IMAGEWINDOW_H)
  37. #define IMAGEWINDOW_H
  38.  
  39.  
  40. /*==== POV-Ray std headers ====*/
  41. #include "config.h"
  42.  
  43. #include "TextEditor.h"        // gSrcWind_...
  44.  
  45.  
  46. /*==== Standard C headers ====*/
  47. #include <stdlib.h>
  48. #include <setjmp.h>
  49.  
  50. /*==== Macintosh-specific headers ====*/
  51. #include <Types.h>
  52. #include <Controls.h>
  53. #include <Dialogs.h>
  54. #include <Files.h>
  55. #include <Memory.h>
  56. #include <PictUtils.h>
  57. #include <QuickDraw.h>
  58. #include <Resources.h>
  59. #include <Windows.h>
  60. #include <scrap.h>
  61. #include <Folders.h>
  62. #include <errors.h>            /* dupFNErr, etc */
  63. #include <fonts.h>
  64. #include <string.h>            /* strcpy/cat */
  65. #include <toolutils.h>        /* BitTst, etc */
  66. #include <QuickTimeComponents.h>    // ComponentInstance
  67.  
  68. #if defined (applec)
  69. #include <strings.h>        /* p2cstr */
  70. #endif // applec
  71.  
  72.  
  73. /*==== definitions ====*/
  74. #define    kNoAnimSuffix    -1    // for saveOutputFile()
  75.  
  76.  
  77. /*==== globals ====*/
  78. extern WindowPtr        gImageWindowPtr;        // the image window
  79. extern Boolean            gImageWindIsValid;        // true if valid stuff in window
  80. extern Boolean            gUsingCustomPalette;    // does the user desire to use color q?
  81. extern int                gColorQuantMethod;        // what kind of color quantization?
  82. extern Boolean            gTooBigForPICT;            // true if X size too big to save/display as PICT
  83. extern Boolean            gDoingVirtualFile;        // true if doing virtual image buffering
  84.  
  85.  
  86. /*==== prototypes ====*/
  87. void    InitImageWindow(void);
  88. void    KillImageWindow(void);
  89. void    SetupOffscreen(void);
  90. void    KillOffscreen(void);
  91. void    SetupPalettes(void);
  92. void    CloseImageWindow(void);
  93. void    InvalRect_ImageWindow(Boolean DoWholeWindow);
  94. void    DoResizeImageWindow(WindowPtr w, short h, short v);
  95. void    DoGrowImageWindow(WindowPtr w, Point p);
  96. void    SetImageWindowMag(short magMenuItem);
  97. void    UpdateImageWindow(void);
  98.  
  99. void    make_undo(void);
  100. void    undo_image(void);
  101. void    revert_image(void);
  102.  
  103. void    open_virtual(void);
  104. void    delete_virtual(void);
  105. void    dispose_virtual(void);
  106. void    swap_virtual_segment(short y);
  107.  
  108. void    SetCustomPalette(Boolean doScreenUpdate);
  109. void    paint_to_picture(short do_disk_buffer);
  110.  
  111. char * BuildImageFileName(int animSuffix);
  112. void    SaveOutputFile(Boolean getName, ComponentInstance ci);
  113.  
  114. // NOTE: Out of necessity, these prototypes are duplicated in CONFIG.H
  115. void    POV_Mac_Display_Init(int width, int height);
  116. void    POV_Mac_Display_Plot(int x, int y,
  117.                 unsigned int Red, unsigned int Green, unsigned int Blue, unsigned int Alpha);
  118. void    POV_Mac_Display_Plot_Rect (int x1, int x2, int y1, int y2,
  119.                 unsigned int Red, unsigned int Green, unsigned int Blue, unsigned int Alpha);
  120. void    POV_Mac_Display_Finished(void);
  121. void    POV_Mac_Display_Close(void);
  122.  
  123.  
  124. #endif // IMAGEWINDOW_H
  125.  
  126.  
  127.